var xhr = new XMLHttpRequest();

xhr.open('GET', 'https://api.github.com/users/langchain-ai/repos');

xhr.onreadystatechange = function () {
    if (this.readyState === 4 && this.status === 200) {
        const data = JSON.parse(this.responseText);
        data.forEach((movie) => {
            const li = document.createElement('li');
            li.innerHTML = `<strong>${movie.title}</strong> - ${movie.year}`;
            document.querySelector('#results').appendChild(li);
        });
    }
};

xhr.send();